<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>星座测试统计 - 生活方式</title>
    <link rel="stylesheet" href="style.css">
    <!-- 引入Chart.js库 -->
    <script src="chart.js"></script>
    <!-- 引入自定义图表脚本 -->
    <script src="charts.js"></script>
</head>
<body>
    <div class="page">
        <!-- 内容容器 -->
        <div class="content-container">
            <!-- 主内容区 -->
            <main>
                <!-- 头部信息 -->
                <div class="card">
                    <h1>星座生活方式</h1>
                    <p>探索不同星座的生活习惯与价值观</p>
                </div>

                <!-- 星座生活方式图表 -->
                <div class="card">
                    <h2>星座生活方式分析</h2>
                    <div class="chart-container" style="height: 400px;">
                        <canvas id="lifestyleChart"></canvas>
                    </div>
                </div>

                <!-- 生活习惯统计 -->
                <div class="card">
                    <h2>生活习惯统计</h2>
                    <p>十二星座在不同生活习惯方面的表现</p>
                    <div class="index-list" style="padding: 0 10px;">
                        <div class="index-item">
                            <div class="index-header">
                                <span class="zodiac-name">摩羯座</span>
                                <span class="success-score">睡眠质量: 92%</span>
                            </div>
                            <div class="index-bar">
                                <div class="index-fill index-fill-capricorn" style="width: 92%;"></div>
                            </div>
                        </div>
                        <div class="index-item">
                            <div class="index-header">
                                <span class="zodiac-name">水瓶座</span>
                                <span class="success-score">创造力: 95%</span>
                            </div>
                            <div class="index-bar">
                                <div class="index-fill index-fill-aquarius" style="width: 95%;"></div>
                            </div>
                        </div>
                        <div class="index-item">
                            <div class="index-header">
                                <span class="zodiac-name">双鱼座</span>
                                <span class="success-score">感性指数: 90%</span>
                            </div>
                            <div class="index-bar">
                                <div class="index-fill index-fill-pisces" style="width: 90%;"></div>
                            </div>
                        </div>
                        <div class="index-item">
                            <div class="index-header">
                                <span class="zodiac-name">白羊座</span>
                                <span class="success-score">活力指数: 96%</span>
                            </div>
                            <div class="index-bar">
                                <div class="index-fill index-fill-aries" style="width: 96%;"></div>
                            </div>
                        </div>
                        <div class="index-item">
                            <div class="index-header">
                                <span class="zodiac-name">金牛座</span>
                                <span class="success-score">稳定性: 94%</span>
                            </div>
                            <div class="index-bar">
                                <div class="index-fill index-fill-taurus" style="width: 94%;"></div>
                            </div>
                        </div>
                        <div class="index-item">
                            <div class="index-header">
                                <span class="zodiac-name">双子座</span>
                                <span class="success-score">社交活跃: 98%</span>
                            </div>
                            <div class="index-bar">
                                <div class="index-fill index-fill-gemini" style="width: 98%;"></div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 星座生活特点 -->
                <div class="card">
                    <h2>星座生活特点</h2>
                    <div class="feature-grid">
                        <div class="feature-item">
                            <h3>白羊座</h3>
                            <p>喜欢充满活力的生活，勇于尝试新事物，作息不规律</p>
                        </div>
                        <div class="feature-item">
                            <h3>金牛座</h3>
                            <p>享受舒适稳定的生活，重视物质质量，有固定的生活习惯</p>
                        </div>
                        <div class="feature-item">
                            <h3>双子座</h3>
                            <p>追求多样化的生活体验，容易感到无聊，社交活动丰富</p>
                        </div>
                        <div class="feature-item">
                            <h3>巨蟹座</h3>
                            <p>重视家庭生活，喜欢温馨舒适的环境，情感需求强烈</p>
                        </div>
                        <div class="feature-item">
                            <h3>狮子座</h3>
                            <p>享受高品质生活，喜欢成为焦点，慷慨大方</p>
                        </div>
                        <div class="feature-item">
                            <h3>处女座</h3>
                            <p>注重生活细节，追求完美，有良好的自我管理能力</p>
                        </div>
                    </div>
                </div>

            </main>
        </div>
    </div>
    
    <script>
        // 页面加载完成后初始化图表
        document.addEventListener('DOMContentLoaded', function() {
            // 初始化生活方式图表
            initLifestyleCharts();
        });
    </script>
</body>
</html>